<script>
jQuery(document).ready(function () {
    jQuery("#traction tr").click(function () {
      //jQuery(this).hide();
      var id;
      id = jQuery(this).attr("alt");
      if(id>0)
      {
          location.href="<?php echo $this->baselink; ?>admin/group/edit/gid/"+id;
      }

    });
});
</script>
<div class="w100p filter">
      <div class="float_right">
        <div class="float_left button_leftb m10r">
          <div class="button_rightb"><a href="<?php echo $this->url(array("action" => "add")); ?>"><?php echo $this->translate->_("Add new group");?>
</a></div>
        </div>

        <div class="cl"></div>
      </div>
      <div class="cb"></div>
    </div>
    <div id="main">
      <div class="w950 mc bg_table po p15b">
        <div class="top_left"></div>
        <div class="top_right"></div>
        <div class="bottom_left"></div>
        <div class="bottom_right"></div>
        <h3 class="p15t p15l p15b bg_bot"><b><?php echo $this->translate->_("View Groups");?></b></h3>
        <table cellpadding="0" cellspacing="0" id="traction">
		<tr>
			<th>Group ID</th>
			<th style="text-align:left;padding-left: 10px;"><?php echo $this->translate->_("Group name");?></th>
                        <th style="text-align:left;padding-left: 10px;"><?php echo $this->translate->_("Group Menu UI");?></th>
			<th><?php echo $this->translate->_("Is active");?></th>
		</tr>
<?php $isColor = 'bg2';
if (count($this->paginator) && !empty($this->paginator)):
foreach($this->paginator as $v)
{
            if ($isColor== 'bg1') {
                    $isColor = 'bg2';
            } else {
                    $isColor = 'bg1';
            }
?>
          <tr class="<?php echo $isColor;?>" alt="<?php echo $v['GroupID']; ?>">
			<td><?php echo $v['GroupID'];?></td>
			<td style="text-align:left;padding-left: 10px;"><?php echo $v['GroupName'];?>
			<?php
echo  "<div class=\"row-actions short_action\">";
 if($v['GroupID'] != '1'){
echo "<span><a href='".$this->url(array('action' => 'delete', 'gid' => $v['GroupID']))."'>Trash </a></span></div>";
}
			?>
			</td>
                        <td style="text-align:left;padding-left: 10px;"><?php echo $v['GroupMenu'];?></td>
			<td>
				<?php if($v['IsActive'] == "1") {?>
					<a href="<?php echo $this->url(array("action" => "active", "gid" => $v['GroupID'], 'currentstatus' => $v['IsActive'])); ?>">
						<img style="border-width:0px;" title="Deactive" src="<?php echo $this->layoutUrl;?>img/icon_active.png" />
					</a>
				<?php } else { ?>
					<a href="<?php echo $this->url(array("action" => "active", "gid" => $v['GroupID'], 'currentstatus' => $v['IsActive'] )); ?>">
						<img style="border-width:0px;" title="Active" src="<?php echo $this->layoutUrl;?>img/icon_delete.png" />
					</a>
				<?php } ?>
			
			</td>
		</tr>
	<?php } ?>
	<?php endif; ?>
        </table>
      </div>
<?php echo $this->paginationControl($this->paginator,'Sliding', 'admin_pagination_control.phtml'); ?>
